<!DOCTYPE html>
<html>
<head>
	<title>E8NET</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <include file="./App/Admin/View/Include/css.html" />
    <link rel="stylesheet" href="__PUBLIC__/Admin/css/compiled/tables.css" type="text/css" media="screen" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>

    <include file="./App/Admin/View/Include/navbar.html" />
    <include file="./App/Admin/View/Include/menu.html" />


	<!-- main container -->
    <div class="content">

        <div class="container-fluid">
            <div id="pad-wrapper">

                <!-- users table -->
                <div class="table-wrapper users-table section">
                    <div class="row-fluid head">
                        <div class="span12">
                            <h4>院系管理员管理</h4>
                        </div>
                    </div>

                    <div class="row-fluid filter-block">
                        <div class="pull-right">
                            <div class="ui-select" style="margin-top: -2px;">
                                <select onchange="change($(this).val())">
                                    <option value="" /> 所有院系管理员
                                    <volist name="departmentList" id="department">
                                        <option <if condition="$did eq $department['id']">selected</if> value="{$department.id}" /> {$department.name}
                                    </volist>
                                </select>
                            </div>
                            <a href="{:U('Dadmin/add')}" class="btn-flat pull-right success new-product add-user">+ 添加院系管理员</a>
                        </div>
                    </div>

                    <div class="row-fluid">
                        <table class="table table-hover">
                            <thead>
                            <tr>
                                <th class="span1">ID</th>
                                <th class="span4">
                                    账号/姓名
                                </th>
                                <th class="span3">
                                    <span class="line"></span>所属系别
                                </th>
                                <th class="span3">
                                    <span class="line"></span>LAST LOGIN TIME
                                </th>
                                <th class="span3">
                                    <span class="line"></span>LAST LOGIN IP
                                </th>
                                <th class="span2 align-right">
                                    <span class="line"></span>ACTION
                                </th>
                            </tr>
                            </thead>
                            <tbody>
                            <volist name="dadminList" id="dadmin" >
                                <tr>
                                    <td>{$dadmin.id}</td>
                                    <td>
                                        <img src="__PUBLIC__/Admin/img/contact-img.png" class="img-circle avatar hidden-phone" />
                                        <a href="#" class="name">{$dadmin.account} / {$dadmin.email}</a>
                                        <span class="subtext">{$dadmin.tname}</span>
                                    </td>
                                    <td>{$dadmin.dname}</td>
                                    <td>{$dadmin.last_login_time}</td>
                                    <td>{$dadmin.last_login_ip}</td>
                                    <td class="align-right">
                                        <a href="{:U('Dadmin/edit',array('id'=>$dadmin['id']))}">Edit</a>&nbsp;
                                        <a href="javascript:void(0);" onclick="return delConfirm('__APP__/Dadmin/del/id/{$dadmin.id}','对应管理员将被删除')">Delete</a>
                                    </td>
                                </tr>
                            </volist>
                            </tbody>
                        </table>
                    </div>
                </div>
                <!-- end users table -->

                <div class="row ctrls">
                    <div class="pagination pull-right">
                        <ul>
                            {$page}
                        </ul>
                    </div>
                </div>

            </div>
        </div>
    </div>
    <!-- end main container -->

	<include file="./App/Admin/View/Include/js.html" />

    <script>
        function change(id) {
//            $.post("{:U('Dadmin/Index',array('did'=>" + id + "))}",{},function(result){
//                location.reload();
//            })
            window.location.href = "__ACTION__/did/" + id;
        }
    </script>

</body>
</html>